package com.orangefunction.tomcat.redissessions;

import java.io.IOException;
/**
 * 序列化接口
 * @author yhm
 *
 */
public interface Serializer {
	
	void setClassLoader(ClassLoader loader);

	byte[] attributesHashFrom(RedisSession session) throws IOException;

	byte[] serializeFrom(RedisSession session, SessionSerializationMetadata metadata) throws IOException;

	void deserializeInto(byte[] data, RedisSession session, SessionSerializationMetadata metadata) throws IOException, ClassNotFoundException;
}
